<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		div{
			width: 400px;
			height: 400px;
			background: yellow;
			border:  4px solid #000;
			position: relative;
			overflow: hidden;
		}
		span{
			width: 400px;
			height: 100px;
			background: red;
			position: absolute;
			top: 400px;
			transition: 0.7s

		}
		div:hover span{
			top: 300px;

		}

	</style>
</head>
<body>
<div>
	
	<span>定位于伪元素</span>
</div>
	
</body>
</html>